#include <iostream>
#include "rdtsc.h"
using namespace std;

unsigned long factorial(unsigned int n)
{
  if ( n <= 1 )
  {
    return 1;
  }
  else
  {
    n = n * factorial(n-1);
    return n;
  }
}

int main()
{
	Rdtsc t;

	t.start();

	for ( int i = 0; i < 1000; ++i )
	{
		factorial(15);
	}

	t.stop();

	return 0;
}
